import request from '@/utils/request'

// 秘籍宝典-分类
export function cheatsCategorylist(query) {
  return request({
    url: '/cheats_category/list',
    method: 'get',
    params: query
  })
}
//秘籍管理 
export function managerList(query) {
  return request({
    url: '/cheats/managerList',
    method: 'get',
    params: query
  })
}
//全部分类数据
export function cateListData(query) {
  return request({
    url: '/cheats_category/listData',
    method: 'get',
    params: query
  })
}
//添加分类
export function cateListAdd(data) {
  return request({
    url: '/cheats_category',
    method: 'post',
    data: data
  })
}
//编辑分类
export function editCateList(data) {
  return request({
    url: '/cheats_category',
    method: 'put',
	data: data
  })
}
//删除分类{ids}
export function delCateList(ids) {
  return request({
    url: '/cheats_category/'+ids,
    method: 'DELETE'
  })
}
//新增秘籍
export function cheats(data) {
  return request({
    url: '/cheats',
    method: 'post',
    data: data
  })
}
// 删除宝典
export function delCheats(id) {
  return request({
    url: '/cheats/'+id,
    method: 'DELETE'
  })
}
// 编辑宝典
export function editCheats(data) {
  return request({
    url: '/cheats',
    method: 'put',
	data:data
  })
}
// 热门秘籍
export function cheatsList(query) {
  return request({
    url: '/cheats/list',
    method: 'get',
    params: query
  })
}
//详情
export function cheatsDetail(id) {
  return request({
    url: '/cheats/'+id,
    method: 'get'
  })
}
//新增案例
export function addCase(data) {
  return request({
    url: '/cheats/addCase',
    method: 'post',
    data: data
  })
}
//统计
export function managerAmount(query) {
  return request({
    url: '/cheats/managerAmount',
    method: 'get',
    params: query
  })
}
//上传图片
export function upLoadImg(data) {
  return request({
    url: '/common/upload',
    method: 'post',
    data: data
  })
}
